import Vue from 'vue'
import App from './App.vue'

import router from '@/router'
// 全局引入vant中的组件，并use（挂载到Vue的原型中，后期可以在组件中通过this.$来使用）
import { Toast, Icon, Uploader, Dialog, Field, ActionSheet, Tab, Tabs, List, PullRefresh,SwipeCell,Button,Search} from 'vant';
Vue.use(Toast)
  .use(Icon)
  .use(Uploader)
  .use(Dialog)
  .use(Field)
  .use(ActionSheet)
  .use(Tab)
  .use(Tabs)
  .use(List)
  .use(PullRefresh)
  .use(SwipeCell)
  .use(Button)
  .use(Search);
  

// 全局重置样式
import '@/styles/reset.less'

Vue.config.productionTip = false
Vue.directive('title', {
  inserted: function (el, binding) {
    　document.title = el.dataset.title
  }
});


new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
